package cn.xwt.weidisk.pojo.dto;

import cn.xwt.weidisk.pojo.dao.FileDo;

import java.io.Serializable;
import java.util.Date;

/**
 * @author 薛慰涛
 * 图片信息类
 */
public class ImageData implements Serializable {
    private Long id;
    private String name;
    private String key;
    private Integer size;
    private String type;
    private String path;
    private Date time;
    private String link;

    public ImageData() {}

    public ImageData(FileDo fileDo, String link) {
        this.id = fileDo.getId();
        this.name = fileDo.getName();
        this.key = fileDo.getKey();
        this.size = fileDo.getSize();
        this.type = fileDo.getType();
        this.path = fileDo.getPath();
        this.time = fileDo.getUpdateTime();
        this.link = link;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public String getLink() {
        return link;
    }

    public void setLink(String link) {
        this.link = link;
    }

    @Override
    public String toString() {
        return "ImageData{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", key='" + key + '\'' +
                ", size=" + size +
                ", type='" + type + '\'' +
                ", path='" + path + '\'' +
                ", time=" + time +
                ", link='" + link + '\'' +
                '}';
    }
}
